﻿@{
    ViewBag.Title = "GetJsonFile";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Get Json File</h2>

<script type="text/javascript">
    $(document).ready(function () {
        $.getJSON("/Data/test.json", function (data) {
            var links = data;
            if (links instanceof Array && links.length > 0) {
                for (var i = 0; i < links.length; i++) {
                    ZEUS.DEBUG.log("Category: " + links[i].category);
                    if (links[i].detail.length > 0) {
                        ZEUS.DEBUG.log("Detail: ");
                        for (var j = 0; j < links[i].detail.length; j++) {
                            ZEUS.DEBUG.log(" - " + links[i].detail[j].name);
                            ZEUS.DEBUG.log(" - " + links[i].detail[j].link);
                        }
                    }
                    ZEUS.DEBUG.log("*************************************************");
                }
            }
        });
    });
</script>
